home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / etc / bash_completion.d / reportbug < prev    next >
Encoding:
Text File  |  2010-11-16  |  4.5 KB  |  133 lines

  1. # bash completion for (Debian) reportbug package
  2.  
  3. have reportbug &&
  4. _reportbug()
  5. {
  6.     local cur prev
  7.  
  8.     COMPREPLY=()
  9.     _get_comp_words_by_ref cur prev
  10.  
  11.     case $prev in
  12.         -f|--filename|-i|--include|--mta|-o|--output)
  13.             _filedir
  14.             return 0
  15.             ;;
  16.         -B|--bts)
  17.             COMPREPLY=( $( compgen -W "debian guug kde mandrake help" -- \
  18.                 "$cur" ))
  19.             return 0
  20.             ;;
  21.         -e|--editor|--mua)
  22.             COMP_WORDS=(COMP_WORDS[0] "$cur")
  23.             COMP_CWORD=1
  24.             _command
  25.             return 0
  26.             ;;
  27.         --mode)
  28.             COMPREPLY=( $( compgen -W "novice standard expert" -- "$cur" ) )
  29.             return 0
  30.             ;;
  31.         -S|--severity)
  32.             COMPREPLY=( $( compgen -W "grave serious important normal \
  33.                 minor wishlist" -- "$cur" ) )
  34.             return 0
  35.             ;;
  36.         -u|--ui|--interface)
  37.             COMPREPLY=( $( compgen -W "newt text gnome" -- "$cur" ) )
  38.             return 0
  39.             ;;
  40.         -t|--type)
  41.             COMPREPLY=( $( compgen -W "gnats debbugs" -- "$cur" ) )
  42.             return 0
  43.             ;;
  44.         -T|--tag)
  45.             COMPREPLY=( $( compgen -W "none \
  46.                 woody potato sarge sarge-ignore etch etch-ignore \
  47.                 lenny lenny-ignore sid experimental confirmed \
  48.                 d-i fixed fixed-in-experimental fixed-upstream \
  49.                 help l10n moreinfo patch pending security \
  50.                 unreproducible upstream wontfix ipv6 lfs" -- "$cur" ))
  51.             return 0
  52.             ;;
  53.         --from-buildd)
  54.             COMPREPLY=( $( compgen -S "_" -W '$( apt-cache dumpavail | \
  55.                 command grep "^Source: $cur" | sort -u | cut -f2 -d" " )' ))
  56.             return 0
  57.             ;;
  58.         *)
  59.             ;;
  60.     esac
  61.  
  62.     COMPREPLY=($( compgen -W '--help --version --attach \
  63.         --no-query-bts --query-bts --bts --body --body-file --bodyfile \
  64.         --no-config-files --class --configure --check-available --debug \
  65.         --no-check-available --debconf --test --draftpath --editor --email \
  66.         --exit-prompt --filename --from-buildd --gnupg --gpg --path --gnus \
  67.         --header --include --no-check-installed --check-installed \
  68.         --justification --kudos --keyid --license --list-cc \
  69.         --maintonly --mirror --mode --mua --mta --mutt --mh --nmh \
  70.         --bugnumber --no-bug-script --no-cc-menu --output --offline \
  71.         --print --paranoid --no-paranoid --pgp --proxy --http_proxy \
  72.         --pseudo-header --quiet --query-only --query-source --no-query-source \
  73.         --realname --report-quiet --reply-to --replyto --subject --severity \
  74.         --smtphost --timeout --tls --smtpuser --smtppasswd --src --source --type \
  75.         --tag --template --verify --no-verify --no-cc --package-version \
  76.         --no-compress --ui --interface \
  77.         wnpp boot-floppies kernel bugs.debian.org \
  78.         cdimage.debian.org general installation-reports \
  79.         listarchives lists.debian.org mirrors nm.debian.org \
  80.         press project qa.debian.org release-notes \
  81.         security.debian.org tech-ctte upgrade-reports \
  82.         www.debian.org' -- "$cur" ) \
  83.         $( apt-cache pkgnames -- "$cur" 2> /dev/null) )
  84.     _filedir
  85.     return 0
  86. } &&
  87. complete -F _reportbug -o filenames reportbug
  88.  
  89. have querybts &&
  90. _querybts()
  91. {
  92.     local cur prev split=false
  93.  
  94.     COMPREPLY=()
  95.     _get_comp_words_by_ref cur prev
  96.  
  97.     _split_longopt && split=true
  98.  
  99.     case $prev in
  100.         -B|--bts)
  101.             COMPREPLY=( $( compgen -W "debian guug kde mandrake help" \
  102.                 -- "$cur" ))
  103.             return 0
  104.             ;;
  105.         -u|--ui|--interface)
  106.             COMPREPLY=($( compgen -W "newt text gnome" -- "$cur" ))
  107.             return 0
  108.             ;;
  109.     esac
  110.  
  111.     $split && return 0
  112.  
  113.     COMPREPLY=($( compgen -W '-h --help -v --version -A --archive \
  114.         -B --bts -l --ldap --no-ldap --proxy --http_proxy \
  115.         -s --source -w --web -u --ui --interface \
  116.         wnpp boot-floppies kernel bugs.debian.org \
  117.         cdimage.debian.org general installation-reports \
  118.         listarchives lists.debian.org mirrors nm.debian.org \
  119.         press project qa.debian.org release-notes \
  120.         security.debian.org tech-ctte upgrade-reports \
  121.         www.debian.org' -- "$cur" ) \
  122.         $( apt-cache pkgnames -- "$cur" 2> /dev/null) )
  123. } &&
  124. complete -F _querybts -o filenames querybts
  125.  
  126. # Local variables:
  127. # mode: shell-script
  128. # sh-basic-offset: 4
  129. # sh-indent-comment: t
  130. # indent-tabs-mode: nil
  131. # End:
  132. # ex: ts=4 sw=4 et filetype=sh
  133.